package cc.deng.wubo.minapp.beans;

import cc.deng.wubo.minapp.core.base.BaseModel;
import org.nutz.dao.DB;
import org.nutz.dao.entity.annotation.*;
import org.nutz.json.JsonField;


/**
 * 上传文件
 * @author deng.wubo@smarttoo.cn
 */
@Table("t_fileupload_info")
public class FileUploadInfo extends BaseModel {

    @Id

    @JsonField(forceString = true)
    @Prev({
            @SQL(db= DB.MYSQL,value = "SELECT IFNULL(MAX(id),0)+1 FROM t_fileupload_info"),
            @SQL(db= DB.ORACLE,value = "SELECT COALESCE(MAX(id),0)+1 FROM t_fileupload_info")
    })
    private Long id;

    @Column("server_path")
    @ColDefine(type = ColType.VARCHAR, notNull = true,width = 500)
    @Comment("服务器路径")
    private String serverPath;


    @Column("ex_name")
    @ColDefine(type = ColType.VARCHAR, notNull = true,width = 100)
    @Comment("文件扩展名")
    private String exName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getServerPath() {
        return serverPath;
    }

    public void setServerPath(String serverPath) {
        this.serverPath = serverPath;
    }



    public String getExName() {
        return exName;
    }

    public void setExName(String exName) {
        this.exName = exName;
    }
}
